package com.aptemo.webetek.client.utils;

import java.util.Comparator;

import com.aptemo.webetek.shared.UserBean;

public class EarningsComparator
		extends SortingComparator implements Comparator<UserBean>
{

	public EarningsComparator(boolean ascending)
	{
		super(ascending);
	}

	@Override
	public int compare(UserBean o1, UserBean o2)
	{
//		if (o1.getEarnings() == null)
//		{
//			return factor;
//		}
//		if (o2.getStatistics() == null)
//		{
//			return -factor;
//		}
		return factor * Double.compare(o1.getEarnings(), o2.getEarnings());
	}
}
